<!DOCTYPE HTML PUBLIC "-//ORA//DTD CD HTML 3.2//EN">
<HTML>
<HEAD>
<TITLE>[Chapter 1] Yet Another Language?</TITLE>
<META NAME="author" CONTENT="Pat Niemeyer and Josh Peck">
<META NAME="date" CONTENT="Tue Jul 22 18:47:15 1997">
<META NAME="form" CONTENT="html">
<META NAME="metadata" CONTENT="dublincore.0.1">
<META NAME="objecttype" CONTENT="book part">
<META NAME="otheragent" CONTENT="gmat dbtohtml">
<META NAME="publisher" CONTENT="O'Reilly &amp; Associates, Inc.">
<META NAME="source" CONTENT="SGML">
<META NAME="subject" CONTENT="Java">
<META NAME="title" CONTENT="Exploring Java">
<META HTTP-EQUIV="Content-Script-Type" CONTENT="text/javascript">
</HEAD>
<body vlink="#551a8b" alink="#ff0000" text="#000000" bgcolor="#FFFFFF" link="#0000ee">

<DIV CLASS=htmlnav>
<H1><a href='index.htm'><IMG SRC="gifs/smbanner.gif"
     ALT="Exploring Java" border=0></a></H1>
<table width=515 border=0 cellpadding=0 cellspacing=0>
<tr>
<td width=172 align=left valign=top><A HREF="ch00_06.htm"><IMG SRC="gifs/txtpreva.gif" ALT="Previous" border=0></A></td>
<td width=171 align=center valign=top><B><FONT FACE="ARIEL,HELVETICA,HELV,SANSERIF" SIZE="-1">Chapter 1</FONT></B></TD>
<td width=172 align=right valign=top><A HREF="ch01_02.htm"><IMG SRC="gifs/txtnexta.gif" ALT="Next" border=0></A></td>
</tr>
</table>

&nbsp;
<hr align=left width=515>
</DIV>
<H1 CLASS=chapter><A CLASS="TITLE" NAME="EXJ-CH-1">1. Yet Another Language?</A></H1>

<DIV CLASS=htmltoc>

<p>
<b>Contents:</b><br>
Enter Java<br>
<A HREF="ch01_02.htm">A Virtual Machine</A><BR>
<A HREF="ch01_03.htm">Java Compared</A><BR>
<A HREF="ch01_04.htm">Safety of Design</A><BR>
<A HREF="ch01_05.htm">Safety of Implementation</A><BR>
<A HREF="ch01_06.htm">Application and User Level Security</A><BR>
<A HREF="ch01_07.htm">Java and the World Wide Web</A><BR>
<A HREF="ch01_08.htm">Java as a General Application Language</A><BR>
<A HREF="ch01_09.htm">A Java Road Map</A><BR>
<A HREF="ch01_10.htm">Availability</A><BR>

<p>
</DIV>

<P CLASS=para>
The greatest challenges and most exciting opportunities for software 
developers today lie in harnessing the power of networks. 
Applications created today, whatever their intended scope or audience, 
will almost certainly be run on machines linked by a global network of 
computing resources.  The increasing importance of networks is placing 
new demands on existing tools, and fueling the demand for a rapidly 
growing list of completely new kinds of applications. 

<P CLASS=para>
We want software that works--consistently, anywhere, on
any platform--and that plays well with other applications. We
want dynamic applications that take advantage of a connected world,
capable of accessing disparate and distributed information sources. We
want truly distributed software that can be extended and upgraded
seamlessly. We want intelligent applications--like autonomous
agents that can roam the Net for us, ferreting out information and
serving as electronic emissaries. We know, at least to some
extent, what we want. So why don't we have it?

<P CLASS=para>
The problem has been that the tools for building these
applications have fallen short. The requirements of speed and
portability have been, for the most part, mutually exclusive, and
security has largely been ignored or misunderstood. There are truly
portable languages, but they are mostly bulky, interpreted, and
slow. These languages are popular as much for their high level
functionality as for their portability. And there are fast languages,
but they usually provide speed by binding themselves to particular
platforms, so they can meet the portability issue only half way. There
are even a few recent safe languages, but they are primarily offshoots
of the portable languages and suffer from the same problems.

<DIV CLASS=sect1>
<h2 CLASS=sect1><A CLASS="TITLE" NAME="EXJ-CH-1-SECT-1">1.1 Enter Java</A></h2>

<P CLASS=para>
The Java programming language, developed at Sun Microsystems under the
guidance of Net luminaries James Gosling and Bill Joy, is designed to
be a machine-independent programming language that is both safe enough
to traverse networks and powerful enough to replace native executable
code.  Java addresses the issues raised here and may help us start
building the kinds of applications we want.

<P CLASS=para>
Right now, most of the enthusiasm for Java stems from its
capabilities for building embedded applications for the World Wide
Web; these applications are called <I CLASS=emphasis>applets</I>. This
book will teach you how to build applets. But there is more to Java
than applets, and I'll also try to show you the
"more." The book will also show you how to use the tools
of Java to accomplish real programming tasks, such as building
networked applications and creating functional user interfaces.  By
the end of the book, you will be able to use these tools to build
powerful Java applets and standalone applications.

<DIV CLASS=sect2>
<h3 CLASS=sect2><A CLASS="TITLE" NAME="EXJ-CH-1-SECT-1.1">Java's Origins</A></h3>

<P CLASS=para>
<A NAME="CH01.HISTORY"></A>The seeds of Java were planted in 1990 by Sun Microsystems patriarch
and chief researcher, Bill Joy. Since Sun's inception in the
early '80s, it has steadily pushed one idea: "The network
is the computer." At the time though, Sun was competing in a
relatively small workstation market, while Microsoft was beginning its
domination of the more mainstream, Intel-based PC world. When Sun
missed the boat on the PC revolution, Joy retreated to Aspen, Colorado,
to work on advanced research. He was committed to accomplishing
complex tasks with simple software, and founded the aptly named Sun
Aspen Smallworks.

<P CLASS=para>
Of the original members of the small team of programmers
assembled in Aspen, James Gosling is the one who will be remembered as
the father of Java.  Gosling first made a name for himself in the
early '80s as the author of Gosling Emacs, the first version of
the popular Emacs editor that was written in C and ran under
UNIX. Gosling Emacs became popular, but was soon
eclipsed by a free version, GNU Emacs, written by
Emacs's original designer. By that time, Gosling had moved on to
design Sun's NeWS window system, which briefly contended with
the X Window System for control of the UNIX graphic
user interface (GUI) desktop in 1987. While some
people would argue that NeWS was superior to X, NeWS lost out because
Sun kept it proprietary and didn't publish source code, while
the primary developers of X formed the X Consortium and took the
opposite approach.

<P CLASS=para>
Designing NeWS taught Gosling the power of integrating an
expressive language with a network-aware windowing
GUI. It also taught Sun that the Internet
programming community will refuse to accept proprietary standards, no
matter how good they may be. The seeds of Java's remarkably
permissive licensing scheme were sown by NeWS's failure. Gosling
brought what he had learned to Bill Joy's nascent Aspen project,
and in 1992, work on the project led to the founding of the Sun
subsidiary, FirstPerson, Inc. Its mission was to lead Sun into the
world of consumer electronics.

<P CLASS=para>
The FirstPerson team worked on developing software for
information appliances, such as cellular phones and personal digital
assistants (PDA). The goal was to enable the
transfer of information and real-time applications over cheap infrared
and packet-based networks. Memory and bandwidth limitations dictated
small and efficient code. The nature of the applications also demanded
they be safe and robust. Gosling and his teammates began programming
in C++, but they soon found themselves confounded by a language that
was too complex, unwieldy, and insecure for the task. They decided to
start from scratch, and Gosling began working on something he dubbed
"C++ minus minus."

<P CLASS=para>
With the floundering of the Apple Newton, it became apparent
that the PDA's ship had not yet come in, so
Sun shifted FirstPerson's efforts to interactive TV
(ITV). The programming language of choice for
ITV set-top boxes was the near ancestor of Java, a
language called Oak. Even with its elegance and ability to provide
safe interactivity, Oak could not salvage the lost cause of
ITV. Customers didn't want it, and Sun soon
abandoned the concept.

<P CLASS=para>
At that time, Joy and Gosling got together to decide on a new
strategy for their language. It was 1993, and the explosion of interest
in the Internet, and the World Wide Web in particular, presented a new
opportunity. Oak was small, robust, architecture independent, and
object oriented. As it happens, these are also the requirements for a
universal, network-savvy programming language. Sun quickly changed
focus, and with a little retooling, Oak became Java.

</DIV>

<DIV CLASS=sect2>
<h3 CLASS=sect2><A CLASS="TITLE" NAME="EXJ-CH-1-SECT-1.2">Future Buzz?</A></h3>

<P CLASS=para>
I don't think it's overdoing it to say that Java has
caught on like wildfire. Even before its first official release, while
Java was still a nonproduct, nearly every major industry player
jumped on the Java bandwagon. Java licensees include Microsoft, Intel,
IBM, and virtually all major hardware and software vendors. 

<P CLASS=para>
As we begin looking at the Java architecture, you'll see
that much of what is exciting about Java comes from the
self-contained, virtual machine environment in which Java applications
run. Java has been carefully designed so that this supporting
architecture can be implemented either in software, for existing
computer platforms, or in customized hardware, for new kinds of
devices. Sun and other industry giants have announced their intentions
to produce cheap, fast Java chips, the first of which should be
available by the time you read this. Hardware implementations of Java
could power inexpensive network terminals, PDAs, and other information
appliances, to take advantage of transportable Java applications.

<P CLASS=para>
Many people see Java as part of a trend toward cheap,
Net-based, "operating system-less" appliances that will
extend the Net into more and more consumer-related areas. Only time
will tell what people will do with Java, but it's probably worth at
least a passing thought that the applet you write today might well be
running on someone's wristwatch tomorrow. If that seems too
futuristic, 
remember that you can already get a "smart card" (essentially
a credit card) that has a Java interpreter embedded in it. Such a card
could do everything from financial transactions (paying a hotel bill)
to unlocking a door (the door to your hotel room) to rerouting phone
calls (so your hotel room receives your business calls). The card is
already here; it won't be long before the rest of the software has
been built. A Java wristwatch is certainly not far away.

</DIV>

</DIV>


<DIV CLASS=htmlnav>

<P>
<HR align=left width=515>
<table width=515 border=0 cellpadding=0 cellspacing=0>
<tr>
<td width=172 align=left valign=top><A HREF="ch00_06.htm"><IMG SRC="gifs/txtpreva.gif" ALT="Previous" border=0></A></td>
<td width=171 align=center valign=top><a href="index.htm"><img src='gifs/txthome.gif' border=0 alt='Home'></a></td>
<td width=172 align=right valign=top><A HREF="ch01_02.htm"><IMG SRC="gifs/txtnexta.gif" ALT="Next" border=0></A></td>
</tr>
<tr>
<td width=172 align=left valign=top>Acknowledgments</td>
<td width=171 align=center valign=top><a href="index/idx_0.htm"><img src='gifs/index.gif' alt='Book Index' border=0></a></td>
<td width=172 align=right valign=top>A Virtual Machine</td>
</tr>
</table>
<hr align=left width=515>

<IMG SRC="gifs/smnavbar.gif" USEMAP="#map" BORDER=0> 
<MAP NAME="map"> 
<AREA SHAPE=RECT COORDS="0,0,108,15" HREF="../javanut/index.htm"
alt="Java in a Nutshell"> 
<AREA SHAPE=RECT COORDS="109,0,200,15" HREF="../langref/index.htm" 
alt="Java Language Reference"> 
<AREA SHAPE=RECT COORDS="203,0,290,15" HREF="../awt/index.htm" 
alt="Java AWT"> 
<AREA SHAPE=RECT COORDS="291,0,419,15" HREF="../fclass/index.htm" 
alt="Java Fundamental Classes"> 
<AREA SHAPE=RECT COORDS="421,0,514,15" HREF="../exp/index.htm" 
alt="Exploring Java"> 
</MAP>
</DIV>

</BODY>
</HTML>
